package com.gift.recommendation.modules.admin.service;

import com.gift.recommendation.modules.admin.dao.entity.NoticeEntity;
import com.gift.recommendation.modules.admin.dao.mapper.NoticeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author zzh <2658137258@qq.com>
 * @date 2023/1/15
 */
@Repository
public class NoticeService {

    @Autowired
    private NoticeMapper noticeMapper;

    public void insertSelective(NoticeEntity notice){
        noticeMapper.insertSelective(notice);
    }

    public void deleteByPrimaryKey(Long integer){
        noticeMapper.deleteByPrimaryKey(integer);
    }

    public void updateByExampleSelective(NoticeEntity notice, Example example){
        noticeMapper.updateByExampleSelective(notice,example);
    }

    public void updateByPrimaryKeySelective(NoticeEntity notice){
        noticeMapper.updateByPrimaryKeySelective(notice);
    }

    public List<NoticeEntity> selectByExample(Example example){
        return noticeMapper.selectByExample(example);
    }

    public NoticeEntity selectByPrimaryKey(Long id){
        return noticeMapper.selectByPrimaryKey(id);
    }

    public NoticeEntity selectOneByExample(Example example){
        return noticeMapper.selectOneByExample(example);
    }
}
